﻿using Finbook.Mvc.Services;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Finbook.Mvc.Infrastructure
{
    public class ContrabandModelBinderProvider
        : IModelBinderProvider
    {
        private readonly IContrabandAppService _contrabandAppService;
        public ContrabandModelBinderProvider(IContrabandAppService contrabandAppService)
        {
            _contrabandAppService = contrabandAppService;
        }
        public IModelBinder GetBinder(ModelBinderProviderContext context)
        {
            return new ContrabandModelBinder(_contrabandAppService);
        }
    }
}
